-
-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(connector): connector error handler, throw errmsg on general errors #1458
Conversation
LOG-3239 Connector Error Exposure
对于有些配置上的错误,需要暴露具体信息 (error_code, error_description)。 不能放在 RequestError.data 里。可以是定义一个特殊的错误码或者类型,让外部特殊处理。 |
COMPARE TO
|
Name | Diff |
---|---|
packages/connector-alipay-native/src/constant.ts | 📈 +114 Bytes |
packages/connector-alipay-native/src/index.test.ts | 📈 +136 Bytes |
packages/connector-alipay-native/src/index.ts | 📈 +190 Bytes |
packages/connector-alipay-native/src/types.ts | 📈 +48 Bytes |
packages/connector-alipay/src/constant.ts | 📈 +114 Bytes |
packages/connector-alipay/src/index.test.ts | 📈 +144 Bytes |
packages/connector-alipay/src/index.ts | 📈 +257 Bytes |
packages/connector-alipay/src/types.ts | 📈 +38 Bytes |
packages/connector-aliyun-dm/src/index.ts | 📈 +303 Bytes |
packages/connector-aliyun-dm/src/types.ts | 📈 +36 Bytes |
packages/connector-aliyun-sms/src/index.ts | 📈 +363 Bytes |
packages/connector-facebook/src/index.test.ts | 📈 +17 Bytes |
packages/connector-facebook/src/index.ts | 📈 +263 Bytes |
packages/connector-github/src/index.ts | 📈 +195 Bytes |
packages/connector-google/src/index.ts | 📈 +167 Bytes |
packages/connector-twilio-sms/src/types.ts | 📈 +80 Bytes |
packages/connector-wechat-native/src/constant.ts | 📈 +272 Bytes |
packages/connector-wechat-native/src/index.test.ts | 📈 +258 Bytes |
packages/connector-wechat-native/src/index.ts | 📈 +147 Bytes |
packages/connector-wechat/src/constant.ts | 📈 +272 Bytes |
packages/connector-wechat/src/index.test.ts | 📈 +258 Bytes |
packages/connector-wechat/src/index.ts | 📈 +148 Bytes |
packages/core/src/middleware/koa-connector-error-handler.test.ts | 📈 +613 Bytes |
packages/core/src/middleware/koa-connector-error-handler.ts | 📈 +332 Bytes |
packages/phrases/src/locales/en.ts | 📈 +20 Bytes |
packages/phrases/src/locales/zh-cn.ts | 📈 +20 Bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's paste the screenshot next time if the code itself cannot show the result clearly
also, remember to use squash merge :-) |
eff132a
to
3df948c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. but @wangsijie would have more context. better to have another stamp
3decf09
to
ba3e3aa
Compare
Summary
Update connector error handler, throw error description on General errors.
Testing
UTs and tested locally.